/**
 * 
 */
package org.ordobill.opensource.telegram.config.property;

/**
 * The {@code ConfigProperty} class represent configuration property.
 * <br />
 * This class has splitChar, splitInt and configLocation.
 * 
 * @author Choi Jin Wook(A.K.A Brian Choi @ Ordobill Office) / choijinwook84@gmail.com
 *
 */
public class ConfigProperty {
    
    private String configLocation;
    
    private String splitChar;
    
    private Integer[] splitInt;
    
    /**
     * The construct of the ConfigProperty
     * 
     */
    public ConfigProperty(){}
    
    /**
     * The construct of the ConfigProperty
     * 
     * @param configLocation
     */
    public ConfigProperty(String configLocation){
        this.setConfigLocation(configLocation);
    }
    
    /**
     * The Accessor method {@code String} of the configure file location.
     * 
     * @return the configLocation
     */
    public String getConfigLocation() {
        return configLocation;
    }

    /**
     * The Accessor method {@code String} of the split up the telegram.
     * 
     * @return the splitChar
     */
    public String getSplitChar() {
        return splitChar;
    }
    
    /**
     * The Accessor method {@code Integer[]} of the split up the telegram.
     * 
     * @return the splitInteger
     */
    public Integer[] getSplitInt() {
        return splitInt;
    }
    
    /**
     * The Mutate method configure file location. 
     * 
     * @param configLocation the configuration location
     */
    public void setConfigLocation(String configLocation) {
        this.configLocation = configLocation;
    }

    /**
     *This method mutate {@code splitChar} into {@code String}.
     * <br />
     * The {@code String} is {@code splitChar} split and make array from"configure.ini" file.
     * <br />
     * This {@code String} contain string length how to split for telegram.
     * <br /><br />
     * Initiate {@code String} from "configure.ini" file.
     * <p>
     *    <blockquote>
     *      <pre>
     *        String b = "/"
     *      </pre>
     *    </blockquote>
     * </p>
     * and split for telegram with <code>String b</code>
     * <p>
     *   <blockquote>
     *     <pre>
     *       StringArr[] = telegram.split(b);
     *     </pre>
     *   </blockquote>
     * </p>
     * 
     * @param splitChar 
     *        The {@code String} is split for telegram
     */
    public void setSplitChar(String splitChar) {
        this.splitChar = splitChar;
    }

    /**
     * This method mutate {@code splitInt} into {@code Integer[]}.
     * <br />
     * The {@code Integer[]} is {@code splitInteger} split and make array from"configure.ini" file.
     * <br />
     * This {@code Integer[]} contain string length how to split for telegram.
     * <br /><br />
     * 
     * Initiate {@code Integer[]} from "configure.ini" file.
     * <p>
     *    <blockquote>
     *      <pre>
     *        Integer a = new Integer[]{1, 2,5}
     *      </pre>
     *    </blockquote>
     * </p>
     * and split for telegram with <code>Integer[] a</code>
     * <p>
     *   <blockquote>
     *     <pre>
     *       int fixInt = 0
     *       StringArr[] = telegram.substring(fixInt, fixInt+a[])
     *     </pre>
     *   </blockquote>
     * </p>
     * 
     * @param splitInt 
     *        The {@code Integer[]} is Array that split length for telegram
     * 
     */
    public void setSplitInt(Integer[] splitInteger) {
        this.splitInt = splitInteger;
    }

}
